package com.mit.web.model.maintenance
{
	import com.mit.web.model.EnquiryModel;
	import com.mit.web.model.common.OptionItem;
	import com.mit.web.vo.maintenance.EmployeeVO;
	
	import mx.collections.ArrayCollection;

	[Bindable]
	public class EmployeeEnquiryModel extends EnquiryModel
	{
		public var searchEmpCode:String;
		public var searchDep:OptionItem;
		

		public var empVO:EmployeeVO;
		public var empList:ArrayCollection;
		
		public function EmployeeEnquiryModel()
		{
			empList = new ArrayCollection();
		}
		
		public function get searchDepId():int{
			if(searchDep == null)
				return 0;
			else
				return int(searchDep.data);
		}
		
		public function get hasSelectedRows():Boolean{
			var rtn:Boolean = false;
			for each(var emp:EmployeeVO in empList){
				if(emp.isSelected){
					rtn = true;
					break;
				}
			}
			return rtn;
		}
	}
}